package cn.mumzone.pos.api.service;

import java.util.HashMap;

import cn.mumzone.basic.net.response.BaseResponse;
import cn.mumzone.pos.model.AppVersionEntity;
import cn.mumzone.pos.model.BannerResult;
import cn.mumzone.pos.model.HelpCenterEntity;
import okhttp3.ResponseBody;
import retrofit2.Response;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by qiuzhenhuan on 2019/6/24.
 */

public interface AppService {


    /**
     * 下载apk
     * @param apkUrl
     * @return
     */
    @Streaming
    @GET
    Observable<Response<ResponseBody>> getApkFile(@Url String apkUrl);


    /**
     * 检查更新
     *
     * @return
     */
    @GET("egg_goods/api/v1/pos/updateCheck")
    Observable<Response<BaseResponse<AppVersionEntity>>> updateCheck();


    /**
     * 获取副屏banner
     * @param requestMap
     * @return
     */
    @FormUrlEncoded
    @POST("egg_basic/api/v1/basePos/findPostersListPage")
    Observable<Response<BaseResponse<BannerResult>>> findPostersListPage(@FieldMap HashMap<String, String> requestMap);

    /**
     * 获取帮助中心数据
     * @GET("egg_basic/api/v1/pos/posHelp/findPosHelpCentrePage")
     * @return
     */
    @GET("egg_basic/api/v1/pos/posHelp/findPosHelpCentrePage")
    Observable<Response<BaseResponse<HelpCenterEntity>>> getHelpCenterData();



}
